package org.example.demo2.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.example.demo2.entity.Like;

import java.util.List;

/**
 * @InterfaceName LikeMapper
 * @Description TODO
 * @Author Kx
 * @Date 2025/10/13 9:19
 * @Version 1.0
 */
@Mapper
public interface LikeMapper {
    /**
     * @author: kx
     * @date: 2025/10/13 19:37
     * @return java.util.List<org.example.demo2.entity.Like>
     * @description: 查询所有用户点赞过的帖子记录
    */
    List<Like> getListLikeByPostId(Integer postId);

    void addLike(Like like);

    void deleteLike(Integer postId, Integer userId);
}
